package sync.model.auto;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class Temp {
	public static void main(String[] args) {
		ScheduledExecutorService sexe = Executors.newScheduledThreadPool(1);
		sexe.scheduleAtFixedRate(new Thread() {
			@Override
			public void run() {
				System.out.println("开始执行...");
				try {
					Thread.sleep(5000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				System.out.println("继续执行...");
			}
		}, 0, 2, TimeUnit.SECONDS);
	}
}
